package com.zimin.mapper.config;

import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.core.metadata.TableInfo;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * mybatis-plus 自定义SQL注入
 *
 * @author zimin
 * @since 2022/1/19 11:12 上午
 */
@Configuration
public class MybatisPlusSqlInjector extends DefaultSqlInjector {

    /**
     * <p>只需要增加方法，保留MP自带方法</p>
     *
     * @param mapperClass
     * @param tableInfo
     * @return java.util.List<com.baomidou.mybatisplus.core.injector.AbstractMethod>
     * @since 2022-01-19 11:13:43
     */
    @Override
    public List<AbstractMethod> getMethodList(Class<?> mapperClass, TableInfo tableInfo) {
        return super.getMethodList(mapperClass, tableInfo);
    }

}
